home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / alt_stac.dis < prev    next >
Text File  |  1991-04-12  |  6KB  |  159 lines

  1. Article 1764 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!mentor.cc.purdue.edu!purdue!bu.edu!orc!olivea!samsung!cs.utexas.edu!helios!tamuts!n233dk
  3. From: n233dk@tamuts.tamu.edu (Rick Grevelle)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: Alternate Stack Display (Fast)
  6. Message-ID: <9001@helios.TAMU.EDU>
  7. Date: 11 Oct 90 21:19:20 GMT
  8. Sender: usenet@helios.TAMU.EDU
  9. Organization: Texas A&M University
  10. Lines: 145
  11.  
  12.  
  13. While it is understandable that many users would like too see HP release more
  14. information about the internals of their calculators, personally I'm rather
  15. ambivalent.  To me, the HP48 is a Rubic's Cube; a puzzle of sorts.  Releasing
  16. limited details about the 48's internals could enhance playing the GAME.
  17. Disclose too much information, and it could possibly ruin most of the fun.
  18.  
  19. At first this may seem a somewhat strange and selfish attitude, but considering
  20. all of the arguments regarding the alleged unethical publishing practices of HP
  21. employees, it's really not.  Undoubtedly, those individuals who would seriously
  22. limit, or completely prohibit, the flow of this valuable source of information
  23. are unquestionabley moon struck.  Information of this caliber does indeed serve
  24. to enhance the GAME, as well as provide those more serious users with valuable
  25. new tools.
  26.  
  27. Although I've yet to aquire Mr. Donnelly's Tool Kit, I fully intend to do so.
  28. Judging from the reviews seen here, not only do I feel that the software merits
  29. high praise, but also requires the continuous support of the user community if
  30. we are to see more such software.  After all, individual members of the design
  31. team are not required to publish in order to stay employed.  Mr. Donnelly and
  32. various other design team members who chose to invest their personal time and 
  33. energy towards enhancing the very products they are producing, should be 
  34. commended for their efforts.  
  35.  
  36. A case and point.  It has now been so long that I can't actually recall exactly
  37. when it was I first purchased Dr. Wickes' book, "HP-28C/S Insights".  Studying
  38. this excellently written document for uncountable hours  enabled to me master
  39. the stack oriented programming language, RPL, utilizing KEY WORD commands and
  40. functions.  While it took Alonzo Gariepy and his Processor Notes to provide me
  41. with the necessary tools to begin Saturn Assembler, it was Wickes' book which
  42. laid the foundation so crucially needed for development of an understanding of
  43. of RPL internally.
  44.  
  45. Here I have chosen to illustrate the point using an alternate stack display
  46. routine.  It exemplifies RPL programming on an internal level very much in the
  47. manner of HP.  Programs such as this can be easily modified in order to call
  48. user written machine code routines.  An excellent example that utilizes this
  49. technique has already been provided by Dr. Wickes himself when he posted the
  50. encoding schemes ->ASC and ASC->.  Currently, I'm writing almost all of my
  51. routines on this level for the reasons that programs written utilizing KEY
  52. WORDS are often quite slow by comparison, and considerably less challenging.
  53.  
  54. The routine displays a seven level stack leaving the menu bar intact.  It's
  55. considerably faster than any of the other alternate stack display routines to
  56. date.  Because I've only documented about a thousand SYSEVALs in the 48, there
  57. is obviously a great possiblility the routine could be improved to a point to 
  58. where it would not be recognizable from what appears here.  Documenting new 
  59. SYSEVALs and making improvements to already existing routines such as these 
  60. provides a great deal of pleasure.  Should HP choose to make available to the
  61. public their colossal files documenting the 48's internals, they would in 
  62. essence solve the puzzle and kill the thrill of reverse engineering the 
  63. calculator.
  64.  
  65. The RPL disassembly is presented in the same style as Eric Toonen's ROM map
  66. listing for the 28S.  Only a brief explanation appears aside each address.
  67. Several of the addresses can NOT be SYSEVALed as they're only availble for use
  68. in routines written in this fashion.  To package up the program I've included
  69. two choices.  The first, CALTD, can be entered via the 48's keybaord and will
  70. in turn create the alternate display program ALTD on the stack.  Make doubly
  71. sure to checksum CALTD before using it to create ALTD.  I'll be glad to answer
  72. any questions.
  73.  
  74.  
  75. Rick Grevelle
  76.  
  77.  
  78.  
  79. Alternate Stack Display Routine
  80.  
  81. 02D90    begin_RPL
  82. 0403F    short_integer_<8h>
  83. 073CE    start_1_to_n-1
  84. 07221    current_loop_count
  85. 18DBF   short->real
  86. 162AC    real->string
  87. 15442    string_": "
  88. 05193    +_1string2string   
  89. 0314C    depth
  90. 07221    current_loop_count
  91. 03D83    boolean_>_1short2short
  92. 03188    dup
  93. 619AD    branch_if_true
  94. 02D9D    begin RPL
  95. 03244    drop
  96. 0403F    short_integer_<8h>
  97. 07221    current_loop_increment
  98. 03DE0    -_1short2short
  99. 12429    display_string_131x8_1short2string
  100. 07334    next
  101. 391EE    freeze_display
  102. 0312B    end RPL
  103. 61993    branch_if_false
  104. 02D9D    begin RPL
  105. 032C2    over
  106. 15978    ->string_1any
  107. 05193    +_1string2string
  108. 0403F    short_integer_<8h>
  109. 07221    current_loop_count
  110. 03DE0    -_1short2short
  111. 12429    display_string_131x8_1short2string
  112. 03140    depth
  113. 04035    short_integer_<7h>
  114. 624BA    min_1short2short
  115. 0339E    rolld_1short2any...nany
  116. 07334    next
  117. 0400D    short_integer_<3h>
  118. 142FB    freeze_display_1short
  119. 0312B    end RPL
  120. 0312B    end RPL
  121.  
  122.  
  123.  
  124. CALTD
  125. (BYTES: #A1B8h 243.5)
  126.  
  127. %%HP: T(1)A(D)F(.);
  128. \<<
  129.  # 1073CE0403F02D9Dh
  130.  # 42162AC18DBF0722h
  131.  # 2210314C05193154h
  132.  # 19AD0318803D8307h
  133.  # 403F0324402D9D6h
  134.  # 41242903DE007221h
  135.  # 930312B391EE0733h
  136.  # 978032C202D9D619h
  137.  # 72210403F0519315h
  138.  # 314C1242903DE00h
  139.  # 40339E624BA04035h
  140.  # 2B142FB0400D0733h
  141.  # 312B031h 1 12
  142.    START # 5193h
  143.  SYSEVAL
  144.    NEXT # 4003h
  145.  SYSEVAL # 62B9Ch
  146.  SYSEVAL
  147. \>>
  148.  
  149.  
  150. ALTD (Requires ASC->)
  151.  
  152. %%HP: T(1)A(D)F(.);
  153. "D9D20F3040EC37012270FBD81CA2612445139150C41301227038D3088130DA91
  154.  6D9D2044230F3040122700ED309242143370EE193B213039916D9D202C230879
  155.  5139150F3040122700ED3092421C413053040AB426E933043370D0040BF241B2
  156.  130B2130C5D9"
  157.  
  158.  
  159.